from cx_Freeze import setup, Executable
import os, sys

build_exe_options = {
    "include_files": ["FFmpeg.exe"],
    "excludes": ["PySide6", "PyQt5", "PyQt6", "wx", "kivy", "pygame"],
    "optimize": 2
}

# 设置应用程序信息
base = None
if sys.platform == "win32":
    base = "Win32GUI"

executables = [
    Executable(
        "main.py",
        base=base,
        target_name="OpenBilibiliDownloader.exe",
        icon="icon.ico" if os.path.exists("icon.ico") else None
    )
]

setup(
    name="Open Bilibili Video Downloader",
    version="1.0.0",
    description="B站视频下载工具",
    options={"build_exe": build_exe_options},
    executables=executables
)